package com.itheima.tanhua.web;

import com.itheima.tanhua.Dto.UserInfoDto;
import com.itheima.tanhua.service.UserInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;


//操作数据表


@Slf4j
@RestController
@RequestMapping("/user")
public class UserInfoController {

    @Autowired
    private UserInfoService userInfo1Service;


    @PostMapping("/loginReginfo/head")
    public ResponseEntity loginHead(MultipartFile headPhoto) {
        userInfo1Service.loginHead(headPhoto);
        return ResponseEntity.ok(null);
    }


    @PostMapping("/loginReginfo")
    public ResponseEntity loginReginfo(@RequestBody UserInfoDto userInfoDto) {
        userInfo1Service.loginReginfo(userInfoDto);
        return ResponseEntity.ok(null);

    }
}
